package demo.springboot;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import demo.hello.User;

@Component
@RocketMQMessageListener(topic = "TopicTest5", consumerGroup = "Con_Group_One1")
public class RocketMQListener5 implements RocketMQListener<User> {

    public void onMessage(User user) {
        System.out.println("消息name:"+user.getName());
        System.out.println("消息sex:"+user.getSex());
    }

}
